PAGE_SHIFT);
ret = xen_start_info->store_mfn;
- /* We'll return then this will wait for daemon to answer */
+ /*
+ ** Complete initialization of xenbus (viz. set up the
+ ** connection to xenstored now that it has started).
+ */
kthread_run(do_xenbus_probe, NULL, "xenbus_probe");
}
break;
}
EXPORT_SYMBOL(unregister_xenstore_notifier);
-/* called from a thread in privcmd/privcmd.c */
+/*
+** Called either from below xenbus_probe_init() initcall (for domUs)
+** or, for dom0, from a thread created in privcmd/privcmd.c (after
+** the user-space tools have invoked initDomainStore())
+*/
int do_xenbus_probe(void *unused)
{
int err = 0;
- /* Initialize xenstore comms unless already done. */
+ /* Initialize the interface to xenstore. */
err = xs_init();
if (err) {
printk("XENBUS: Error initializing xenstore comms:"
device_register(&xenbus_frontend.dev);
device_register(&xenbus_backend.dev);
+ /*
+ ** Domain0 doesn't have a store_evtchn yet - this will
+ ** be set up later by xend invoking initDomainStore()
+ */
if (!xen_start_info->store_evtchn)
return 0;
}
}
+/*
+** Initialize the interface to xenstore.
+*/
int xs_init(void)
{
int err;
init_MUTEX(&xs_state.transaction_mutex);
xs_state.transaction_pid = -1;
+ /* Initialize the shared memory rings to talk to xenstored */
err = xb_init_comms();
if (err)
return err;